home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
gapdr.zip
/
GAPQBDR.BI
< prev
next >
Wrap
Text File
|
1989-01-18
|
17KB
|
338 lines
'
' Copyright (C) 1988,1989 The GAP Development Company
'
' All Rights Reserved
'
'
' GAPQBDR.BI
'
' Include file for all modules that use GAPQBDR
'
'
DECLARE FUNCTION keybrd% () ' public ASM function
DECLARE FUNCTION read.doorsys% () ' reads door.sys
DECLARE FUNCTION open.gap% () ' reads gapbbs.cnf
DECLARE FUNCTION ckeypress% () ' checks for a key press
DECLARE FUNCTION getakey% () ' gets a single character
DECLARE FUNCTION a.ccess% (a$) ' checks for file existence
DECLARE FUNCTION right.trim$ (a$) ' trims C strings
DECLARE FUNCTION read.gapdos% () ' reads GAPDOS.DAT
DECLARE FUNCTION write.gapdos% () ' writes GAPDOS.DAT
DECLARE FUNCTION read.gapuser% () ' reads USERS.DAT
DECLARE FUNCTION write.gapuser% () ' writes USERS.DAT
DECLARE FUNCTION read.pcbsys% () ' reads PCBOARD.SYS
DECLARE FUNCTION write.pcbsys% () ' writes PCBOARD.SYS
DECLARE FUNCTION read.pcbuser% () ' read pcb USERS
DECLARE FUNCTION write.pcbuser% () ' write pcb USERS
DECLARE FUNCTION getrand% (low%, high%) ' get a random number
DECLARE SUB init.time () ' inits get.time variables
DECLARE SUB no.carrier () ' shows message and calls leave
DECLARE SUB get.string (fld$) ' main imput routine
DECLARE SUB read.cnf (f.name$) ' reads the configuration file
DECLARE SUB init.door () ' initializes the door
DECLARE SUB leave () ' normal exit
DECLARE SUB show.mess (message$, bell%, newline%) ' displays a string
DECLARE SUB nl (how%) ' sends CR/LF
DECLARE SUB ansi (ansicolor$) ' shows ansi colors
DECLARE SUB more () ' checks for full screen
DECLARE SUB pause () ' waits for a keypress
DECLARE SUB elap.time () ' computes elapsed time
DECLARE SUB backspace (num.times%) ' erases characters
DECLARE SUB time.left () ' computes time left
DECLARE SUB waitasec (secs%) ' waits for x number of seconds
DECLARE SUB time.credit (how%) ' computes time credits
DECLARE SUB putachar (c%) ' sends a single character
DECLARE SUB show.file (filename$) ' displays a text file
DECLARE SUB set.status (update%) ' displays status line
DECLARE SUB update.clock () ' updates status line clock
DECLARE SUB putkey (c%) ' sends a single character
DECLARE SUB do.chat () ' chat with caller
DECLARE SUB pagesysop () ' page sysop for chat
DECLARE SUB clear.scr () ' clears local and remote screen
' source code not provided for following functions
DECLARE FUNCTION get.time& () ' returns time as long integer
DECLARE FUNCTION getkeyc% () ' ket a key from local console
DECLARE SUB outstr (ansistr$, row%, col%) ' print strings thru DOS
DECLARE FUNCTION getanum& () ' used internally by getrand
DECLARE SUB init.rand () ' used internally by init.door
DECLARE FUNCTION get.directory$ () ' get current drive and path
DECLARE SUB set.directory (drive$) ' sets the default drive and path
DECLARE SUB wrap.word () ' wraps words during sysop chat
CONST MOREG = "
MORE -
[
Y
]es, [
N
]o, [
C
]ontinous
"
CONST MOREA = "MORE - [Y]es, [N]o, [C]ontinous "
CONST MORE1G = "
MORE -
[
Y
]es, [
N
]o, [
C
]ontinous, [
R
]edisplay
"
CONST MORE1A = "MORE - [Y]es, [N]o, [C]ontinous, [R]edisplay "
CONST PAUSEG = "
Press [
Any Key
] To Continue
"
CONST PAUSEA = "Press [Any Key] To Continue "
CONST YES = 1
CONST NO = 0
' dim colors
CONST BLACK = "
"
CONST RED = "
"
CONST GREEN = "
"
CONST BROWN = "
"
CONST BLUE = "
"
CONST MAGENTA = "
"
CONST CYAN = "
"
CONST WHITE = "
"
'bright colors
CONST BBLACK = "
"
CONST BRED = "
"
CONST BGREEN = "
"
CONST YELLOW = "
"
CONST BBLUE = "
"
CONST BMAGENTA = "
"
CONST BCYAN = "
"
CONST BWHITE = "
"
'***********************************************************************
'* Common variables shared with other modules. *
'* Not for programmer's use! *
'* Do NOT change the order of these common blocks! *
'***********************************************************************
COMMON SHARED /GAPQBDR/ l.ocal AS INTEGER ' l.ocal user flag
COMMON SHARED /GAPQBDR/ lines AS INTEGER ' # of lines currently displayed
COMMON SHARED /GAPQBDR/ flag AS INTEGER ' flag that a space was pressed
COMMON SHARED /GAPQBDR/ column AS INTEGER ' column we are at now
COMMON SHARED /GAPQBDR/ l.ine AS STRING ' temporarily hold characters
COMMON SHARED /GAPQBDR/ CRLF AS STRING ' carriage return and line feed
'$INCLUDE: 'qb.bi'
'***********************************************************************
'* Variables initialized by reading DOOR.SYS (or pcboard.sys) *
'***********************************************************************
COMMON SHARED port AS INTEGER
COMMON SHARED userbaud AS INTEGER
COMMON SHARED parity AS INTEGER
COMMON SHARED node AS INTEGER
COMMON SHARED baud AS INTEGER
COMMON SHARED s.creen AS INTEGER
COMMON SHARED printer AS INTEGER
COMMON SHARED bell AS INTEGER
COMMON SHARED alarm AS INTEGER
COMMON SHARED level AS INTEGER
COMMON SHARED minsleft AS INTEGER
COMMON SHARED c.olor AS INTEGER
COMMON SHARED page AS INTEGER
COMMON SHARED expert AS INTEGER
COMMON SHARED timeson AS LONG
COMMON SHARED recnum AS LONG
COMMON SHARED uploads AS LONG
COMMON SHARED downloads AS LONG
COMMON SHARED upbytes AS LONG
COMMON SHARED downbytes AS LONG
COMMON SHARED maxbytes AS LONG
COMMON SHARED username AS STRING
COMMON SHARED first AS STRING
COMMON SHARED last AS STRING
COMMON SHARED city AS STRING
COMMON SHARED hphone AS STRING
COMMON SHARED bphone AS STRING
COMMON SHARED password AS STRING
COMMON SHARED lastdate AS STRING
COMMON SHARED subscrip AS STRING
'***********************************************************************
'* global variables *
'***********************************************************************
COMMON SHARED noup AS INTEGER ' if 1, get.string wont upper case
COMMON SHARED do.pcb AS INTEGER ' if 1, then BBS system is pcboard
COMMON SHARED timeleft AS INTEGER ' time user has left
COMMON SHARED timecredit AS INTEGER ' time credits for user (in mins)
COMMON SHARED anystring1 AS STRING ' global garbage collector
COMMON SHARED maindir AS STRING ' path to the main directory
COMMON SHARED gendir AS STRING ' path to the gen directory
COMMON SHARED sysname AS STRING ' sysop's name
COMMON SHARED bbs.dir AS STRING ' path to BBS default dir
COMMON SHARED board.name AS STRING ' name of the BBS
COMMON SHARED temptime AS LONG ' for calculating time out
COMMON SHARED timenow AS LONG ' time it is now (in secs)
COMMON SHARED starttime AS LONG ' time the user started (in secs)
'***********************************************************************
'* GAPDOS.DAT record structure. *
'* For those who wish to read, modify, and update the record. *
'***********************************************************************
TYPE GAPDOSREC
userfirst AS STRING * 16